package 面试.OOM;/*
 *@Author: helen
 *@Date:   2021/4/16 19:39
 *@Description:
 */

public class MetaspaceOOMDemo {

    static class OOMTest{}

    public static void main(String[] args) {
        int i = 0;
        try{
            while (true){
                i++;
                //Enhancer enhancer = new Enhancer();
            }
        }catch (Exception e){
            System.out.println("***********多少次以后发生异常：" + i);
            e.printStackTrace();
         }
    }
}
